<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>合约提示</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0
        }

        #toast {
            height: 0.7rem;
            line-height: 0.7rem;
            background: #FFFBED;
            padding: 0 0.32rem;
            width: 100%;
            color: #E19511;
            font-size: 0.26rem;
        }

        #toast img {
            width: 0.32rem;
            height: 0.32rem;
            vertical-align: middle;
            margin-left: 0.06rem
        }

        #toast span {
            line-height: 0.7rem;
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <p id="toast">
        <span> 实时BTC算力指数：</span>
        <span class="textNumber">--</span>
        <span>CNY/T*天</span>
        <img src="../../image/iconss.png" alt="" class="seeDetail">
    </p>
</body>

</html>

<script src="../../script/autosize.js"></script>
<script src="../../script/jquery_three_two_one.js"></script>
<script src="../../script/fastclick.js"></script>
<script src="../../script/app.js"></script>
<script>
    apiready = function () {
        var app = new APP();
        var account = app.getAccount();
        var headerChoose = api.pageParam.is_contact; //头部选择 默认为直购;
        app.ajaxPro({
            url: "site/get-index",
            values: {
                token: account? account.token : ""
            },
            openFlower: true
        }, function (ret) {
            if (ret.code == 200) {
                $('.textNumber').text(ret.data.index);
            } else {
                app.toast(ret.message);
            }
        });
        $("body").click(function () {
            app.closeF('power_math');
        });
        $(".seeDetail").click(function (e) {
            e.stopPropagation();
            var rect = document.getElementsByClassName('seeDetail')[0].getBoundingClientRect();
            var xPosition = rect.left;
            var openFrameHeight = app.accMul(4, document.getElementsByTagName("html")[0].style.fontSize.replace('px', ''));
            app.openFrame({
                name: "power_math",
                url: app.hd + "mainpage/power_math.html",
                bgColor: "",
                rect: {
                    x: 0,
                    y: app.H*0.2 + (headerChoose == "true" ? 50 : 10),
                    w: app.W,
                    h: openFrameHeight
                },
                pageParam: {
                    left: xPosition
                }
            });
        });
    }
</script>